import 'package:json_annotation/json_annotation.dart';

part 'poetry_model.g.dart';

@JsonSerializable()
class PoetryItemModel {
  String author;
  int authorId;
  String body;
  String title;
  String type;
  int id;
  int rankingNum;

  PoetryItemModel(
      {this.author,
      this.authorId,
      this.body,
      this.title,
      this.type,
      this.id,
      this.rankingNum});

  factory PoetryItemModel.fromJson(Map<String, dynamic> json) =>
      _$PoetryItemModelFromJson(json);

  Map<String, dynamic> toJson() => _$PoetryItemModelToJson(this);
}
